Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Displaying Raw • Download


sbapp/kivymd/uix/menu/menu.py f8b3e3760b831745cf10d97aeae64e9c00a136a9 (f8b3e376) Text, 40.89 KB

T8b949e"""
Components/Menu
===============

.. seealso::

`Material Design spec, Menus <https://m3.material.io/components/menus/overview>`_

.. rubric:: Menus display a list of choices on temporary surfaces.

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-preview.png
:align: center

Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with Menus should be easy to open, close, and interact with
Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs Menu content should be suited to user needs
Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan Menu items should be easy to scan

Usage
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

.. code-block:: python

from kivy.lang import Builder
from kivy.metrics import dp

from kivymd.app import MDApp
from kivymd.uix.menu import MDDropdownMenu

KV = '''
MDScreen:

MDRaisedButton:
id: button
text: "Press me"
pos_hint: {"center_x": .5, "center_y": .5}
on_release: app.menu_open()
'''


class Test(MDApp):
def menu_open(self):
menu_items = [
{
"text": f"Item {i}",
"on_release": lambda x=f"Item {i}": self.menu_callback(x),
} for i in range(5)
]
MDDropdownMenu(
caller=self.root.ids.button, items=menu_items
).open()

def menu_callback(self, text_item):
print(text_item)

def build(self):
self.theme_cls.primary_palette = "Orange"
self.theme_cls.theme_style = "Dark"
return Builder.load_string(KV)


Test().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-usage.gif
:align: center

Anatomy
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-item-anatomy.png
:align: center

You can combine the following parameters:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon leading_icon
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon trailing_icon
trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text trailing_text

...to create the necessary types of menu items:

.. code-block:: python

menu_items = [
{
"text": "Strikethrough",
"leading_icon": "check",
"trailing_icon": "apple-keyboard-command",
"trailing_text": "+Shift+X",
}
]

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-item-leading-icon-trailing-icon-trailing-text.png
:align: center

.. code-block:: python

menu_items = [
{
"text": "Strikethrough",
"trailing_icon": "apple-keyboard-command",
"trailing_text": "+Shift+X",
}
]

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-item-trailing-icon-trailing-text.png
:align: center

.. code-block:: python

menu_items = [
{
"text": "Strikethrough",
"trailing_icon": "apple-keyboard-command",
}
]

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-item-trailing-icon.png
:align: center

.. code-block:: python

menu_items = [
{
"text": "Strikethrough",
"trailing_text": "Shift+X",
}
]

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-item-trailing-text.png
:align: center

.. code-block:: python

menu_items = [
{
"text": "Strikethrough",
"leading_icon": "check",
"trailing_icon": "apple-keyboard-command",
}
]

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-item-leading-icon-trailing-icon.png
:align: center

.. code-block:: python

menu_items = [
{
"text": "Strikethrough",
"leading_icon": "check",
}
]

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-item-leading-icon.png
:align: center

.. code-block:: python

menu_items = [
{
"text": "Strikethrough",
"leading_icon": "check",
"trailing_text": "Shift+X",
}
]

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-item-leading-icon-trailing-text.png
:align: center

.. code-block:: python

menu_items = [
{
"text": "Strikethrough",
}
]

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-item-text.png
:align: center

You can use the following parameters to customize the menu items:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color text_color
leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color leading_icon_color
trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color trailing_icon_color
trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color trailing_text_color

.. code-block:: python

menu_items = [
{
"text": "Strikethrough",
"leading_icon": "check",
"trailing_icon": "apple-keyboard-command",
"trailing_text": "+Shift+X",
"leading_icon_color": "orange",
"trailing_icon_color": "green",
"trailing_text_color": "red",
}
]

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-item-customize.png
:align: center

.. Header:
Header
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

.. code-block:: python

from kivy.lang import Builder
from kivy.metrics import dp

from kivymd.app import MDApp
from kivymd.uix.menu import MDDropdownMenu
from kivymd.uix.boxlayout import MDBoxLayout

KV = '''
<MenuHeader>
spacing: "12dp"
padding: "4dp"
adaptive_height: True

MDIconButton:
icon: "gesture-tap-button"
pos_hint: {"center_y": .5}

MDLabel:
text: "Actions"
adaptive_size: True
pos_hint: {"center_y": .5}


MDScreen:

MDRaisedButton:
id: button
text: "PRESS ME"
pos_hint: {"center_x": .5, "center_y": .5}
on_release: app.menu.open()
'''


class MenuHeader(MDBoxLayout):
'''An instance of the class that will be added to the menu header.'''


class Test(MDApp):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.screen = Builder.load_string(KV)
menu_items = [
{
"text": f"Item {i}",
"on_release": lambda x=f"Item {i}": self.menu_callback(x),
} for i in range(5)
]
self.menu = MDDropdownMenu(
header_cls=MenuHeader(),
caller=self.screen.ids.button,
items=menu_items,
)

def menu_callback(self, text_item):
print(text_item)

def build(self):
self.theme_cls.primary_palette = "Orange"
self.theme_cls.theme_style = "Dark"
return self.screen


Test().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-header.png
:align: center

Menu with MDTopAppBar
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The :class:`~MDDropdownMenu` works well with the standard
:class:`~kivymd.uix.toolbar.MDTopAppBar`. Since the buttons on the Toolbar are created
by the MDTopAppBar component, it is necessary to pass the button as an argument to
the callback using `lambda x: app.callback(x)`. This example uses drop down menus
for both the righthand and lefthand menus.

.. code-block:: python

from kivy.lang import Builder
from kivy.metrics import dp

from kivymd.app import MDApp
from kivymd.uix.menu import MDDropdownMenu
from kivymd.uix.snackbar import Snackbar

KV = '''
MDBoxLayout:
orientation: "vertical"

MDTopAppBar:
title: "MDTopAppBar"
left_action_items: [["menu", lambda x: app.callback(x)]]
right_action_items: [["dots-vertical", lambda x: app.callback(x)]]

MDLabel:
text: "Content"
halign: "center"
'''


class Test(MDApp):
def build(self):
self.theme_cls.primary_palette = "Orange"
self.theme_cls.theme_style = "Dark"
menu_items = [
{
"text": f"Item {i}",
"on_release": lambda x=f"Item {i}": self.menu_callback(x),
} for i in range(5)
]
self.menu = MDDropdownMenu(items=menu_items)
return Builder.load_string(KV)

def callback(self, button):
self.menu.caller = button
self.menu.open()

def menu_callback(self, text_item):
self.menu.dismiss()
Snackbar(text=text_item).open()


Test().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/toolbar-menu.png
:align: center

.. Position:
Position
========

Bottom position
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

.. seealso::

:attr:`~MDDropdownMenu.position`

.. code-block:: python

from kivy.lang import Builder
from kivy.metrics import dp

from kivymd.app import MDApp
from kivymd.uix.menu import MDDropdownMenu

KV = '''
MDScreen:

MDTextField:
id: field
pos_hint: {'center_x': .5, 'center_y': .6}
size_hint_x: None
width: "200dp"
hint_text: "Password"
on_focus: if self.focus: app.menu.open()
'''


class Test(MDApp):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.screen = Builder.load_string(KV)
menu_items = [
{
"text": f"Item {i}",
"on_release": lambda x=f"Item {i}": self.set_item(x),
} for i in range(5)]
self.menu = MDDropdownMenu(
caller=self.screen.ids.field,
items=menu_items,
position="bottom",
)

def set_item(self, text_item):
self.screen.ids.field.text = text_item
self.menu.dismiss()

def build(self):
self.theme_cls.primary_palette = "Orange"
self.theme_cls.theme_style = "Dark"
return self.screen


Test().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-position.png
:align: center

Center position
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

.. code-block:: python

from kivy.lang import Builder
from kivy.metrics import dp

from kivymd.app import MDApp
from kivymd.uix.menu import MDDropdownMenu

KV = '''
MDScreen:

MDDropDownItem:
id: drop_item
pos_hint: {'center_x': .5, 'center_y': .5}
text: 'Item 0'
on_release: app.menu.open()
'''


class Test(MDApp):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.screen = Builder.load_string(KV)
menu_items = [
{
"text": f"Item {i}",
"on_release": lambda x=f"Item {i}": self.set_item(x),
} for i in range(5)
]
self.menu = MDDropdownMenu(
caller=self.screen.ids.drop_item,
items=menu_items,
position="center",
)
self.menu.bind()

def set_item(self, text_item):
self.screen.ids.drop_item.set_item(text_item)
self.menu.dismiss()

def build(self):
self.theme_cls.primary_palette = "Orange"
self.theme_cls.theme_style = "Dark"
return self.screen


Test().run()

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-position-center.gif
:align: center

API break
=========

1.1.1 version
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

.. code-block:: python

from kivy.lang import Builder
from kivy.metrics import dp
from kivy.properties import StringProperty

from kivymd.app import MDApp
from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.uix.list import IRightBodyTouch, OneLineAvatarIconListItem
from kivymd.uix.menu import MDDropdownMenu

KV = '''
<RightContentCls>
disabled: True
adaptive_size: True
pos_hint: {"center_y": .5}

MDIconButton:
icon: root.icon
icon_size: "16sp"
md_bg_color_disabled: 0, 0, 0, 0

MDLabel:
text: root.text
font_style: "Caption"
adaptive_size: True
pos_hint: {"center_y": .5}


<Item>

IconLeftWidget:
icon: root.left_icon

RightContentCls:
id: container
icon: root.right_icon
text: root.right_text


MDScreen:

MDRaisedButton:
id: button
text: "PRESS ME"
pos_hint: {"center_x": .5, "center_y": .5}
on_release: app.menu.open()
'''


class RightContentCls(IRightBodyTouch, MDBoxLayout):
icon = StringProperty()
text = StringProperty()


class Item(OneLineAvatarIconListItem):
left_icon = StringProperty()
right_icon = StringProperty()
right_text = StringProperty()


class Test(MDApp):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.screen = Builder.load_string(KV)
menu_items = [
{
"text": f"Item {i}",
"right_text": "+Shift+X",
"right_icon": "apple-keyboard-command",
"left_icon": "web",
"viewclass": "Item",
"height": dp(54),
"on_release": lambda x=f"Item {i}": self.menu_callback(x),
} for i in range(5)
]
self.menu = MDDropdownMenu(
caller=self.screen.ids.button,
items=menu_items,
bg_color="#bdc6b0",
width_mult=4,
)

def menu_callback(self, text_item):
print(text_item)

def build(self):
return self.screen


Test().run()

1.2.0 version
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

.. code-block:: python

from kivy.lang import Builder
from kivy.metrics import dp

from kivymd.app import MDApp
from kivymd.uix.menu import MDDropdownMenu

KV = '''
MDScreen:

MDRaisedButton:
id: button
text: "PRESS ME"
pos_hint: {"center_x": .5, "center_y": .5}
on_release: app.menu.open()
'''


class Test(MDApp):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.screen = Builder.load_string(KV)
menu_items = [
{
"text": f"Item {i}",
"leading_icon": "web",
"trailing_icon": "apple-keyboard-command",
"trailing_text": "+Shift+X",
"trailing_icon_color": "grey",
"trailing_text_color": "grey",
"on_release": lambda x=f"Item {i}": self.menu_callback(x),
} for i in range(5)
]
self.menu = MDDropdownMenu(
md_bg_color="#bdc6b0",
caller=self.screen.ids.button,
items=menu_items,
)

def menu_callback(self, text_item):
print(text_item)

def build(self):
return self.screen


Test().run()
"""

Tff7b72from T7ee787__future__ Tff7b72import Te6edf3annotations

Te6edf3__all__ Tff7b72= Tb4b4b4(
Ta5d6ff"Ta5d6ffBaseDropdownItemTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDDropdownMenuTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDDropdownTextItemTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDDropdownLeadingIconItemTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDDropdownTrailingIconItemTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDDropdownTrailingIconTextItemTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDDropdownTrailingTextItemTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDDropdownLeadingTrailingIconTextItemTa5d6ff"Tb4b4b4,
Ta5d6ff"Ta5d6ffMDDropdownLeadingIconTrailingTextItemTa5d6ff"Tb4b4b4,
Tb4b4b4)

Tff7b72import T7ee787os

Tff7b72from T7ee787kivyT7ee787.T7ee787clock Tff7b72import Te6edf3Clock
Tff7b72from T7ee787kivyT7ee787.T7ee787coreT7ee787.T7ee787window Tff7b72import Te6edf3Window
Tff7b72from T7ee787kivyT7ee787.T7ee787lang Tff7b72import Te6edf3Builder
Tff7b72from T7ee787kivyT7ee787.T7ee787metrics Tff7b72import Te6edf3dp
Tff7b72from T7ee787kivyT7ee787.T7ee787properties Tff7b72import Tb4b4b4(
Te6edf3ColorPropertyTb4b4b4,
Te6edf3ListPropertyTb4b4b4,
Te6edf3NumericPropertyTb4b4b4,
Te6edf3ObjectPropertyTb4b4b4,
Te6edf3OptionPropertyTb4b4b4,
Te6edf3VariableListPropertyTb4b4b4,
Te6edf3StringPropertyTb4b4b4,
Tb4b4b4)
Tff7b72from T7ee787kivyT7ee787.T7ee787uixT7ee787.T7ee787recycleview Tff7b72import Te6edf3RecycleView

Tff7b72import T7ee787kivymdT7ee787.T7ee787material_resources Tff7b72as T7ee787m_res
Tff7b72from T7ee787kivymd Tff7b72import Te6edf3uix_path
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787behaviors Tff7b72import Te6edf3StencilBehaviorTb4b4b4, Te6edf3RectangularRippleBehavior
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787behaviorsT7ee787.T7ee787motion_behavior Tff7b72import Te6edf3MotionDropDownMenuBehavior
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787boxlayout Tff7b72import Te6edf3MDBoxLayout
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787card Tff7b72import Te6edf3MDCard
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787label Tff7b72import Te6edf3MDLabel
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787list Tff7b72import Te6edf3IRightBody

Tff7b72with Tffa657openTb4b4b4(
Te6edf3osTff7b72.Td2a8ffpathTff7b72.Td2a8ffjoinTb4b4b4(Te6edf3uix_pathTb4b4b4, Ta5d6ff"Ta5d6ffmenuTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffmenu.kvTa5d6ff"Tb4b4b4)Tb4b4b4, Te6edf3encodingTff7b72=Ta5d6ff"Ta5d6ffutf-8Ta5d6ff"
Tb4b4b4) Tff7b72as Te6edf3kv_fileTb4b4b4:
Te6edf3BuilderTff7b72.Td2a8ffload_stringTb4b4b4(Te6edf3kv_fileTff7b72.Td2a8ffreadTb4b4b4(Tb4b4b4)Tb4b4b4)


Tff7b72class T56d364MDMenuTb4b4b4(Te6edf3RecycleViewTb4b4b4)Tb4b4b4:
Te6edf3width_mult Tff7b72= Te6edf3NumericPropertyTb4b4b4(T79c0ff1Tb4b4b4)
T8b949e"""
See :attr:`~MDDropdownMenu.width_mult`.

.. deprecated:: 1.2.0
"""

Te6edf3drop_cls Tff7b72= Te6edf3ObjectPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
See :class:`~MDDropdownMenu` class.
"""


Tff7b72class T56d364BaseDropdownItemTb4b4b4(Te6edf3RectangularRippleBehaviorTb4b4b4, Te6edf3MDBoxLayoutTb4b4b4)Tb4b4b4:
T8b949e"""
Base class for menu items.

.. versionadded:: 1.2.0

For more information, see in the
:class:`~kivymd.uix.behaviors.RectangularRippleBehavior` and
:class:`~kivymd.uix.boxlayout.MDBoxLayout` classes.
"""

Te6edf3text Tff7b72= Te6edf3StringPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
The text of the menu item.

:attr:`text` is a :class:`~kivy.properties.StringProperty`
and defaults to `''`.
"""

Te6edf3leading_icon Tff7b72= Te6edf3StringPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
The leading icon of the menu item.

:attr:`leading_icon` is a :class:`~kivy.properties.StringProperty`
and defaults to `''`.
"""

Te6edf3trailing_icon Tff7b72= Te6edf3StringPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
The trailing icon of the menu item.

:attr:`trailing_icon` is a :class:`~kivy.properties.StringProperty`
and defaults to `''`.
"""

Te6edf3trailing_text Tff7b72= Te6edf3StringPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
The trailing text of the menu item.

:attr:`trailing_text` is a :class:`~kivy.properties.StringProperty`
and defaults to `''`.
"""

Te6edf3text_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Tff7b72NoneTb4b4b4)
T8b949e"""
The color of the text in (r, g, b, a) or string format for the text of the
menu item.

:attr:`text_color` is a :class:`~kivy.properties.ColorProperty`
and defaults to `None`.
"""

Te6edf3leading_icon_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Tff7b72NoneTb4b4b4)
T8b949e"""
The color of the text in (r, g, b, a) or string format for the leading icon
of the menu item.

:attr:`leading_icon_color` is a :class:`~kivy.properties.ColorProperty`
and defaults to `None`.
"""

Te6edf3trailing_icon_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Tff7b72NoneTb4b4b4)
T8b949e"""
The color of the text in (r, g, b, a) or string format for the trailing
icon of the menu item.

:attr:`leading_icon_color` is a :class:`~kivy.properties.ColorProperty`
and defaults to `None`.
"""

Te6edf3trailing_text_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Tff7b72NoneTb4b4b4)
T8b949e"""
The color of the text in (r, g, b, a) or string format for the trailing
text of the menu item.

:attr:`leading_icon_color` is a :class:`~kivy.properties.ColorProperty`
and defaults to `None`.
"""

Te6edf3divider Tff7b72= Te6edf3OptionPropertyTb4b4b4(Ta5d6ff"Ta5d6ffFullTa5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffFullTa5d6ff"Tb4b4b4, Tff7b72NoneTb4b4b4]Tb4b4b4, Te6edf3allownoneTff7b72=Tff7b72TrueTb4b4b4)
T8b949e"""
Divider mode. Available options are: `'Full'`, `None`
and default to `'Full'`.

:attr:`divider` is a :class:`~kivy.properties.OptionProperty`
and defaults to `'Full'`.
"""

Te6edf3divider_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Tff7b72NoneTb4b4b4)
T8b949e"""
Divider color in (r, g, b, a) or string format.

:attr:`divider_color` is a :class:`~kivy.properties.ColorProperty`
and defaults to `None`.
"""


Tff7b72class T56d364MDTrailingTextContainerTb4b4b4(Te6edf3BaseDropdownItemTb4b4b4, Te6edf3IRightBodyTb4b4b4, Te6edf3MDLabelTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a container for trailing text.

.. versionadded:: 1.2.0

For more information, see in the
:class:`~BaseDropdownItem` and
:class:`~kivymd.uix.list.IRightBody` and
:class:`~kivymd.uix.label.MDLabel` classes.
"""


Tff7b72class T56d364MDTrailingIconTextContainerTb4b4b4(Te6edf3BaseDropdownItemTb4b4b4, Te6edf3IRightBodyTb4b4b4, Te6edf3MDBoxLayoutTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a container for trailing icons and trailing text.

.. versionadded:: 1.2.0

For more information, see in the
:class:`~BaseDropdownItem` and
:class:`~kivymd.uix.list.IRightBody` and
:class:`~kivymd.uix.boxlayout.MDBoxLayout` classes.
"""


Tff7b72class T56d364MDDropdownTextItemTb4b4b4(Te6edf3BaseDropdownItemTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a menu item with text without leading and trailing icons.

.. versionadded:: 1.2.0

For more information, see in the :class:`~BaseDropdownItem` class.
"""


Tff7b72class T56d364MDDropdownLeadingIconItemTb4b4b4(Te6edf3BaseDropdownItemTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a menu item with text, leading icon and without trailing icon.

.. versionadded:: 1.2.0

For more information, see in the :class:`~BaseDropdownItem` class.
"""


Tff7b72class T56d364MDDropdownTrailingIconItemTb4b4b4(Te6edf3BaseDropdownItemTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a menu item with text, without leading icon and with trailing
icon.

.. versionadded:: 1.2.0

For more information, see in the :class:`~BaseDropdownItem` class.
"""


Tff7b72class T56d364MDDropdownTrailingIconTextItemTb4b4b4(Te6edf3BaseDropdownItemTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a menu item with text, without leading icon, with trailing
icon and with trailing text.

.. versionadded:: 1.2.0

For more information, see in the :class:`~BaseDropdownItem` class.
"""


Tff7b72class T56d364MDDropdownTrailingTextItemTb4b4b4(Te6edf3BaseDropdownItemTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a menu item with text, without leading icon, without trailing
icon and with trailing text.

.. versionadded:: 1.2.0

For more information, see in the :class:`~BaseDropdownItem` class.
"""


Tff7b72class T56d364MDDropdownLeadingIconTrailingTextItemTb4b4b4(Te6edf3BaseDropdownItemTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a menu item with text, leading icon and with trailing text.

.. versionadded:: 1.2.0

For more information, see in the :class:`~BaseDropdownItem` class.
"""


Tff7b72class T56d364MDDropdownLeadingTrailingIconTextItemTb4b4b4(Te6edf3BaseDropdownItemTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a menu item with text, with leading icon, with trailing
icon and with trailing text.

.. versionadded:: 1.2.0

For more information, see in the :class:`~BaseDropdownItem` class.
"""


Tff7b72class T56d364MDDropdownLeadingTrailingIconItemTb4b4b4(Te6edf3BaseDropdownItemTb4b4b4)Tb4b4b4:
T8b949e"""
Implements a menu item with text, with leading icon, with trailing icon.

.. versionadded:: 1.2.0

For more information, see in the :class:`~BaseDropdownItem` class.
"""


Tff7b72class T56d364MDDropdownMenuTb4b4b4(Te6edf3MotionDropDownMenuBehaviorTb4b4b4, Te6edf3StencilBehaviorTb4b4b4, Te6edf3MDCardTb4b4b4)Tb4b4b4:
T8b949e"""
Dropdown menu class.

For more information, see in the
:class:`~kivymd.uix.behaviors.MotionDropDownMenuBehavior` and
:class:`~kivymd.uix.behaviors.StencilBehavior` and
:class:`~kivymd.uix.card.MDCard`
classes documentation.

:Events:
`on_release`
The method that will be called when you click menu items.
"""

Te6edf3header_cls Tff7b72= Te6edf3ObjectPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
An instance of the class (`Kivy` or `KivyMD` widget) that will be added
to the menu header.

.. versionadded:: 0.104.2

See Header_ for more information.

:attr:`header_cls` is a :class:`~kivy.properties.ObjectProperty`
and defaults to `None`.
"""

Te6edf3items Tff7b72= Te6edf3ListPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
List of dictionaries with properties for menu items.

:attr:`items` is a :class:`~kivy.properties.ListProperty`
and defaults to `[]`.
"""

Te6edf3width_mult Tff7b72= Te6edf3NumericPropertyTb4b4b4(T79c0ff1Tb4b4b4, Te6edf3deprecatedTff7b72=Tff7b72TrueTb4b4b4)
T8b949e"""
This number multiplied by the standard increment ('56dp' on mobile, '64dp'
on desktop), determines the width of the menu items.

If the resulting number were to be too big for the application Window,
the multiplier will be adjusted for the biggest possible one.

.. deprecated:: 1.2.0

Use `width` instead.

.. code-block:: python

self.menu = MDDropdownMenu(
width=dp(240),
...,
)

:attr:`width_mult` is a :class:`~kivy.properties.NumericProperty`
and defaults to `1`.
"""

Te6edf3min_height Tff7b72= Te6edf3NumericPropertyTb4b4b4(Te6edf3dpTb4b4b4(T79c0ff48Tb4b4b4)Tb4b4b4)

Te6edf3max_height Tff7b72= Te6edf3NumericPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
The menu will grow no bigger than this number. Set to 0 for no limit.

:attr:`max_height` is a :class:`~kivy.properties.NumericProperty`
and defaults to `0`.
"""

Te6edf3border_margin Tff7b72= Te6edf3NumericPropertyTb4b4b4(Ta5d6ff"Ta5d6ff4dpTa5d6ff"Tb4b4b4)
T8b949e"""
Margin between Window border and menu.

.. code-block:: python

self.menu = MDDropdownMenu(
border_margin=dp(24),
...,
)

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-border-margin-24.png
:align: center

:attr:`border_margin` is a :class:`~kivy.properties.NumericProperty`
and defaults to `4dp`.
"""

Te6edf3ver_growth Tff7b72= Te6edf3OptionPropertyTb4b4b4(Tff7b72NoneTb4b4b4, Te6edf3allownoneTff7b72=Tff7b72TrueTb4b4b4, Te6edf3optionsTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffupTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffdownTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Where the menu will grow vertically to when opening. Set to `None` to let
the widget pick for you. Available options are: `'up'`, `'down'`.

.. code-block:: python

self.menu = MDDropdownMenu(
ver_growth="up",
...,
)

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-ver-growth-up.png
:align: center

.. code-block:: python

self.menu = MDDropdownMenu(
ver_growth="down",
...,
)

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-ver-growth-down.png
:align: center

:attr:`ver_growth` is a :class:`~kivy.properties.OptionProperty`
and defaults to `None`.
"""

Te6edf3hor_growth Tff7b72= Te6edf3OptionPropertyTb4b4b4(Tff7b72NoneTb4b4b4, Te6edf3allownoneTff7b72=Tff7b72TrueTb4b4b4, Te6edf3optionsTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffrightTa5d6ff"Tb4b4b4]Tb4b4b4)
T8b949e"""
Where the menu will grow horizontally to when opening. Set to `None` to let
the widget pick for you. Available options are: `'left'`, `'right'`.

.. code-block:: python

self.menu = MDDropdownMenu(
hor_growth="left",
...,
)

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-hor-growth-left.png
:align: center

.. code-block:: python

self.menu = MDDropdownMenu(
hor_growth="right",
...,
)

.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/menu-hor-growth-right.png
:align: center

:attr:`hor_growth` is a :class:`~kivy.properties.OptionProperty`
and defaults to `None`.
"""

Te6edf3background_color Tff7b72= Te6edf3ColorPropertyTb4b4b4(Tff7b72NoneTb4b4b4, Te6edf3deprecatedTff7b72=Tff7b72TrueTb4b4b4)
T8b949e"""
Color in (r, g, b, a) or string format of the background of the menu.

.. deprecated:: 1.2.0

Use `md_bg_color` instead.

:attr:`background_color` is a :class:`~kivy.properties.ColorProperty`
and defaults to `None`.
"""

Te6edf3caller Tff7b72= Te6edf3ObjectPropertyTb4b4b4(Tb4b4b4)
T8b949e"""
The widget object that calls the menu window.

:attr:`caller` is a :class:`~kivy.properties.ObjectProperty`
and defaults to `None`.
"""

Te6edf3position Tff7b72= Te6edf3OptionPropertyTb4b4b4(
Ta5d6ff"Ta5d6ffautoTa5d6ff"Tb4b4b4, Te6edf3optionsTff7b72=Tb4b4b4[Ta5d6ff"Ta5d6fftopTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffautoTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffcenterTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4]
Tb4b4b4)
T8b949e"""
Menu window position relative to parent element.
Available options are: `'auto'`, `'top'`, `'center'`, `'bottom'`.

See Position_ for more information.

:attr:`position` is a :class:`~kivy.properties.OptionProperty`
and defaults to `'auto'`.
"""

Te6edf3radius Tff7b72= Te6edf3VariableListPropertyTb4b4b4(Tb4b4b4[Te6edf3dpTb4b4b4(T79c0ff7Tb4b4b4)Tb4b4b4]Tb4b4b4)
T8b949e"""
Menu radius.

:attr:`radius` is a :class:`~kivy.properties.VariableListProperty`
and defaults to `'[dp(7)]'`.
"""

Te6edf3elevation Tff7b72= Te6edf3NumericPropertyTb4b4b4(Te6edf3m_resTff7b72.Td2a8ffDROP_DOWN_MENU_ELEVATIONTb4b4b4)
T8b949e"""
See :attr:`kivymd.uix.behaviors.elevation.CommonElevationBehavior.elevation`
attribute.

:attr:`elevation` is an :class:`~kivy.properties.NumericProperty`
and defaults to `2`.
"""

Te6edf3shadow_radius Tff7b72= Te6edf3VariableListPropertyTb4b4b4(Tb4b4b4[T79c0ff6Tb4b4b4]Tb4b4b4, Te6edf3lengthTff7b72=T79c0ff4Tb4b4b4)
T8b949e"""
See :attr:`kivymd.uix.behaviors.elevation.CommonElevationBehavior.shadow_radius`
attribute.

:attr:`shadow_radius` is an :class:`~kivy.properties.VariableListProperty`
and defaults to `[6]`.
"""

Te6edf3shadow_softness Tff7b72= Te6edf3NumericPropertyTb4b4b4(Te6edf3m_resTff7b72.Td2a8ffDROP_DOWN_MENU_SOFTNESSTb4b4b4)
T8b949e"""
See :attr:`kivymd.uix.behaviors.elevation.CommonElevationBehavior.shadow_softness`
attribute.

:attr:`shadow_softness` is an :class:`~kivy.properties.NumericProperty`
and defaults to `6`.
"""

Te6edf3shadow_offset Tff7b72= Te6edf3ListPropertyTb4b4b4(Te6edf3m_resTff7b72.Td2a8ffDROP_DOWN_MENU_OFFSETTb4b4b4)
T8b949e"""
See :attr:`kivymd.uix.behaviors.elevation.CommonElevationBehavior.shadow_offset`
attribute.

:attr:`shadow_offset` is an :class:`~kivy.properties.ListProperty`
and defaults to `(0, -2)`.
"""

Te6edf3_items Tff7b72= Tb4b4b4[Tb4b4b4]
Te6edf3_start_coords Tff7b72= Tb4b4b4[Tb4b4b4]
Te6edf3_tar_x Tff7b72= T79c0ff0
Te6edf3_tar_y Tff7b72= T79c0ff0

Tff7b72def Tff7b72__init__Tb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)Tb4b4b4:
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ff__init__Tb4b4b4(Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)
Te6edf3WindowTff7b72.Td2a8ffbindTb4b4b4(
Te6edf3on_resizeTff7b72=Tff7b72selfTff7b72.Td2a8ff_remove_menuTb4b4b4,
Te6edf3on_maximizeTff7b72=Tff7b72selfTff7b72.Td2a8ff_remove_menuTb4b4b4,
Te6edf3on_restoreTff7b72=Tff7b72selfTff7b72.Td2a8ff_remove_menuTb4b4b4,
Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffregister_event_typeTb4b4b4(Ta5d6ff"Ta5d6ffon_dismissTa5d6ff"Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffmenu Tff7b72= Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffmd_menu
Tff7b72selfTff7b72.Td2a8fftarget_height Tff7b72= T79c0ff0

Tff7b72def Td2a8ffadjust_widthTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Adjust the width of the menu if the width of the menu goes beyond
the boundaries of the parent window from starting point.
"""

Tff7b72if Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72>Tff7b72= Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2Tb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8ffwidth Tff7b72> Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffwidth Tff7b72= Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4]
Tff7b72- Tff7b72selfTff7b72.Td2a8ffborder_margin
Tff7b72- Tb4b4b4(
Tb4b4b4(Tff7b72selfTff7b72.Td2a8ffcallerTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2 Tff7b72+ Tff7b72selfTff7b72.Td2a8ffborder_marginTb4b4b4)
Tff7b72if Tff7b72selfTff7b72.Td2a8ffposition Tff7b72in Tb4b4b4[Ta5d6ff"Ta5d6ffrightTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4]
Tff7b72else T79c0ff0
Tb4b4b4)
Tb4b4b4)
Tff7b72elseTb4b4b4:
Tff7b72if Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72- Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72< Tff7b72selfTff7b72.Td2a8ffwidthTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffwidth Tff7b72= Tb4b4b4(
Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72- Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffborder_margin
Tb4b4b4)

Tff7b72def Td2a8ffcheck_ver_growthTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Checks whether the height of the lower/upper borders of the menu
exceeds the limits borders of the parent window.
"""

Tff7b72if Tff7b72selfTff7b72.Td2a8fftarget_height Tff7b72> Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffborder_marginTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffver_growth Tff7b72= Ta5d6ff"Ta5d6ffupTa5d6ff"
Tff7b72elseTb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72> Te6edf3WindowTff7b72.Td2a8ffheight Tff7b72- Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffver_growth Tff7b72= Ta5d6ff"Ta5d6ffdownTa5d6ff"

Tff7b72def Td2a8ffcheck_hor_growthTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Checks whether the width of the left/right menu borders exceeds the
boundaries of the parent window.
"""

Tff7b72if Tb4b4b4(
Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72- Tb4b4b4(Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72+ Tff7b72selfTff7b72.Td2a8ffborder_marginTb4b4b4)
Tff7b72<Tff7b72= Tff7b72selfTff7b72.Td2a8ffwidth
Tb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffhor_growth Tff7b72= Ta5d6ff"Ta5d6ffleftTa5d6ff"
Tff7b72elif Tff7b72selfTff7b72.Td2a8ffwidth Tff7b72>Tff7b72= Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72+ Tff7b72selfTff7b72.Td2a8ffborder_marginTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffhor_growth Tff7b72= Ta5d6ff"Ta5d6ffrightTa5d6ff"

Tff7b72def Td2a8ffget_target_posTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tb4b4b4[Tffa657floatTb4b4b4, Tffa657floatTb4b4b4]Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_tar_xTb4b4b4, Tff7b72selfTff7b72.Td2a8ff_tar_y Tff7b72= Tff7b72selfTff7b72.Td2a8ff_start_coords

Tff7b72if Tff7b72selfTff7b72.Td2a8ffver_growth Tff7b72== Ta5d6ff"Ta5d6ffupTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_tar_y Tff7b72= Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72+ Tff7b72selfTff7b72.Td2a8ffheight
Tff7b72elseTb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_tar_y Tff7b72= Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4]

Tff7b72if Tff7b72selfTff7b72.Td2a8ffhor_growth Tff7b72== Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_tar_x Tff7b72= Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffwidth
Tff7b72elseTb4b4b4:
Tff7b72selfTff7b72.Td2a8ff_tar_x Tff7b72= Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4]

Tff7b72return Tff7b72selfTff7b72.Td2a8ff_tar_xTb4b4b4, Tff7b72selfTff7b72.Td2a8ff_tar_y

Tff7b72def Td2a8ffset_target_heightTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
Set the target height of the menu depending on the size of each item.
"""

Tff7b72selfTff7b72.Td2a8fftarget_height Tff7b72= T79c0ff0
Tff7b72for Te6edf3item Tff7b72in Tff7b72selfTff7b72.Td2a8ffmenuTff7b72.Td2a8ffdataTb4b4b4:
Tff7b72selfTff7b72.Td2a8fftarget_height Tff7b72+Tff7b72= Te6edf3itemTff7b72.Td2a8ffgetTb4b4b4(Ta5d6ff"Ta5d6ffheightTa5d6ff"Tb4b4b4, Tff7b72selfTff7b72.Td2a8ffmin_heightTb4b4b4)

Tff7b72if T79c0ff0 Tff7b72< Tff7b72selfTff7b72.Td2a8ffmax_height Tff7b72< Tff7b72selfTff7b72.Td2a8fftarget_heightTb4b4b4:
Tff7b72selfTff7b72.Td2a8fftarget_height Tff7b72= Tff7b72selfTff7b72.Td2a8ffmax_height

Tff7b72if Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72>Tff7b72= Te6edf3WindowTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2Tb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8fftarget_height Tff7b72> Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4]Tb4b4b4:
Tff7b72selfTff7b72.Td2a8fftarget_height Tff7b72= Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4]
Tff7b72- Tff7b72selfTff7b72.Td2a8ffborder_margin
Tff7b72- Tb4b4b4(
Tb4b4b4(Tff7b72selfTff7b72.Td2a8ffcallerTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2 Tff7b72+ Tff7b72selfTff7b72.Td2a8ffborder_marginTb4b4b4)
Tff7b72if Tff7b72selfTff7b72.Td2a8ffposition Tff7b72in Tb4b4b4[Ta5d6ff"Ta5d6fftopTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4]
Tff7b72else T79c0ff0
Tb4b4b4)
Tb4b4b4)
Tff7b72elseTb4b4b4:
Tff7b72if Te6edf3WindowTff7b72.Td2a8ffheight Tff7b72- Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72< Tff7b72selfTff7b72.Td2a8fftarget_heightTb4b4b4:
Tff7b72selfTff7b72.Td2a8fftarget_height Tff7b72= Tb4b4b4(
Te6edf3WindowTff7b72.Td2a8ffheight Tff7b72- Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffborder_margin
Tb4b4b4)

Tff7b72def Td2a8ffset_menu_propertiesTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Sets the size and position for the menu window."""

Tff7b72if Tff7b72selfTff7b72.Td2a8ffcallerTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffmenuTff7b72.Td2a8ffdata Tff7b72= Tff7b72selfTff7b72.Td2a8ff_items
T8b949e# We need to pick a starting point, see how big we need to be,
T8b949e# and where to grow to.
Tff7b72selfTff7b72.Td2a8ff_start_coords Tff7b72= Tff7b72selfTff7b72.Td2a8ffcallerTff7b72.Td2a8ffto_windowTb4b4b4(Tff7b72*Tff7b72selfTff7b72.Td2a8ffcallerTff7b72.Td2a8ffcenterTb4b4b4)

Tff7b72selfTff7b72.Td2a8ffadjust_widthTb4b4b4(Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffset_target_heightTb4b4b4(Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffcheck_ver_growthTb4b4b4(Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffcheck_hor_growthTb4b4b4(Tb4b4b4)

Tff7b72def Td2a8ffset_menu_posTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8ffposition Tff7b72== Ta5d6ff"Ta5d6ffautoTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffmenuTff7b72.Td2a8ffx Tff7b72= Tff7b72selfTff7b72.Td2a8ff_tar_x
Tff7b72selfTff7b72.Td2a8ffmenuTff7b72.Td2a8ffy Tff7b72= Tff7b72selfTff7b72.Td2a8ff_tar_y Tff7b72- Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ffheader_clsTff7b72.Td2a8ffheight Tff7b72if Tff7b72selfTff7b72.Td2a8ffheader_cls Tff7b72else T79c0ff0
Tb4b4b4)
Tff7b72elseTb4b4b4:
Tff7b72if Tff7b72selfTff7b72.Td2a8ffposition Tff7b72== Ta5d6ff"Ta5d6ffcenterTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffpos Tff7b72= Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2Tb4b4b4,
Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2Tb4b4b4,
Tb4b4b4)
Tff7b72elif Tff7b72selfTff7b72.Td2a8ffposition Tff7b72== Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffpos Tff7b72= Tb4b4b4(
Tb4b4b4(Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2Tb4b4b4)
Tff7b72if Tff7b72not Tff7b72selfTff7b72.Td2a8ffhor_growth
Tff7b72else Tb4b4b4(
Tb4b4b4(Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffwidthTb4b4b4)
Tff7b72if Tff7b72selfTff7b72.Td2a8ffhor_growth Tff7b72== Ta5d6ff"Ta5d6ffleftTa5d6ff"
Tff7b72else Tb4b4b4(Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4)
Tb4b4b4)Tb4b4b4,
Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4]
Tff7b72- Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ffheight
Tff7b72+ Tff7b72selfTff7b72.Td2a8ffborder_margin
Tff7b72+ Tff7b72selfTff7b72.Td2a8ffcallerTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2
Tb4b4b4)Tb4b4b4,
Tb4b4b4)
Tff7b72elif Tff7b72selfTff7b72.Td2a8ffposition Tff7b72== Ta5d6ff"Ta5d6fftopTa5d6ff"Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffpos Tff7b72= Tb4b4b4(
Tb4b4b4(Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2Tb4b4b4)
Tff7b72if Tff7b72not Tff7b72selfTff7b72.Td2a8ffhor_growth
Tff7b72else Tb4b4b4(
Tb4b4b4(Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffwidthTb4b4b4)
Tff7b72if Tff7b72selfTff7b72.Td2a8ffhor_growth Tff7b72== Ta5d6ff"Ta5d6ffleftTa5d6ff"
Tff7b72else Tb4b4b4(Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4]Tb4b4b4)
Tb4b4b4)Tb4b4b4,
Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4]
Tff7b72+ Tff7b72selfTff7b72.Td2a8ffcallerTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2
Tff7b72+ Tff7b72selfTff7b72.Td2a8ffborder_marginTb4b4b4,
Tb4b4b4)

Tff7b72def Td2a8ffadjust_positionTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tffa657strTb4b4b4:
T8b949e"""
Return value 'auto' for the menu position if the menu position is out
of screen.
"""

Te6edf3position Tff7b72= Tff7b72selfTff7b72.Td2a8ffposition

Tff7b72if Te6edf3position Tff7b72== Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4:
Tff7b72if Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4]
Tff7b72- Tb4b4b4(Tff7b72selfTff7b72.Td2a8ffheight Tff7b72+ Tff7b72selfTff7b72.Td2a8ffborder_margin Tff7b72+ Tff7b72selfTff7b72.Td2a8ffcallerTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2Tb4b4b4)
Tff7b72< T79c0ff0
Tb4b4b4)Tb4b4b4:
Te6edf3position Tff7b72= Ta5d6ff"Ta5d6ffautoTa5d6ff"
Tff7b72elif Te6edf3position Tff7b72== Ta5d6ff"Ta5d6fftopTa5d6ff"Tb4b4b4:
Tff7b72if Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4]
Tff7b72+ Tff7b72selfTff7b72.Td2a8ffcallerTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2
Tff7b72+ Tff7b72selfTff7b72.Td2a8ffborder_margin
Tff7b72> Te6edf3WindowTff7b72.Td2a8ffheight
Tb4b4b4)Tb4b4b4:
Te6edf3position Tff7b72= Ta5d6ff"Ta5d6ffautoTa5d6ff"
Tff7b72elif Te6edf3position Tff7b72== Ta5d6ff"Ta5d6ffcenterTa5d6ff"Tb4b4b4:
Tff7b72if Tb4b4b4(
Tb4b4b4(
Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72+ Tff7b72selfTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2 Tff7b72> Te6edf3WindowTff7b72.Td2a8ffheight
Tff7b72or Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff1Tb4b4b4] Tff7b72- Tff7b72selfTff7b72.Td2a8ffheight Tff7b72/ T79c0ff2 Tff7b72< T79c0ff0
Tb4b4b4)
Tff7b72or Te6edf3WindowTff7b72.Td2a8ffwidth Tff7b72- Tb4b4b4(Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72+ Tff7b72selfTff7b72.Td2a8ffborder_marginTb4b4b4)
Tff7b72< Tff7b72selfTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2
Tff7b72or Tff7b72selfTff7b72.Td2a8ff_start_coordsTb4b4b4[T79c0ff0Tb4b4b4] Tff7b72+ Tff7b72selfTff7b72.Td2a8ffborder_margin Tff7b72< Tff7b72selfTff7b72.Td2a8ffwidth Tff7b72/ T79c0ff2
Tb4b4b4)Tb4b4b4:
Te6edf3position Tff7b72= Ta5d6ff"Ta5d6ffautoTa5d6ff"

Tff7b72return Te6edf3position

Tff7b72def Td2a8ffopenTb4b4b4(Tff7b72selfTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Animate the opening of a menu window."""

Tff7b72selfTff7b72.Td2a8ffset_menu_propertiesTb4b4b4(Tb4b4b4)
Te6edf3WindowTff7b72.Td2a8ffadd_widgetTb4b4b4(Tff7b72selfTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffposition Tff7b72= Tff7b72selfTff7b72.Td2a8ffadjust_positionTb4b4b4(Tb4b4b4)

Tff7b72if Tff7b72selfTff7b72.Td2a8ffwidth Tff7b72<Tff7b72= T79c0ff100Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffwidth Tff7b72= Te6edf3dpTb4b4b4(T79c0ff240Tb4b4b4)

Tff7b72selfTff7b72.Td2a8ffheight Tff7b72= Tff7b72selfTff7b72.Td2a8fftarget_height
Tff7b72selfTff7b72.Td2a8ff_tar_xTb4b4b4, Tff7b72selfTff7b72.Td2a8ff_tar_y Tff7b72= Tff7b72selfTff7b72.Td2a8ffget_target_posTb4b4b4(Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffx Tff7b72= Tff7b72selfTff7b72.Td2a8ff_tar_x
Tff7b72selfTff7b72.Td2a8ffy Tff7b72= Tff7b72selfTff7b72.Td2a8ff_tar_y Tff7b72- Tff7b72selfTff7b72.Td2a8fftarget_height
Tff7b72selfTff7b72.Td2a8ffscale_value_center Tff7b72= Tff7b72selfTff7b72.Td2a8ffcallerTff7b72.Td2a8ffcenter
Tff7b72selfTff7b72.Td2a8ffset_menu_posTb4b4b4(Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffon_openTb4b4b4(Tb4b4b4)

Tff7b72def Td2a8ffon_itemsTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3instanceTb4b4b4, Te6edf3valueTb4b4b4: Tffa657listTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""
The method sets the class that will be used to create the menu item.
"""

Te6edf3items Tff7b72= Tb4b4b4[Tb4b4b4]
Te6edf3viewclass Tff7b72= Ta5d6ff"Ta5d6ffMDDropdownTextItemTa5d6ff"

Tff7b72for Te6edf3data Tff7b72in Te6edf3valueTb4b4b4:
Tff7b72if Ta5d6ff"Ta5d6ffviewclassTa5d6ff" Tff7b72not Tff7b72in Te6edf3dataTb4b4b4:
Tff7b72if Tb4b4b4(
Ta5d6ff"Ta5d6ffleading_iconTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_iconTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_textTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tb4b4b4)Tb4b4b4:
Te6edf3viewclass Tff7b72= Ta5d6ff"Ta5d6ffMDDropdownTextItemTa5d6ff"
Tff7b72elif Tb4b4b4(
Ta5d6ff"Ta5d6ffleading_iconTa5d6ff" Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_iconTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_textTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tb4b4b4)Tb4b4b4:
Te6edf3viewclass Tff7b72= Ta5d6ff"Ta5d6ffMDDropdownLeadingIconItemTa5d6ff"
Tff7b72elif Tb4b4b4(
Ta5d6ff"Ta5d6ffleading_iconTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_iconTa5d6ff" Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_textTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tb4b4b4)Tb4b4b4:
Te6edf3viewclass Tff7b72= Ta5d6ff"Ta5d6ffMDDropdownTrailingIconItemTa5d6ff"
Tff7b72elif Tb4b4b4(
Ta5d6ff"Ta5d6ffleading_iconTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_iconTa5d6ff" Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_textTa5d6ff" Tff7b72in Te6edf3data
Tb4b4b4)Tb4b4b4:
Te6edf3viewclass Tff7b72= Ta5d6ff"Ta5d6ffMDDropdownTrailingIconTextItemTa5d6ff"
Tff7b72elif Tb4b4b4(
Ta5d6ff"Ta5d6ffleading_iconTa5d6ff" Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_iconTa5d6ff" Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_textTa5d6ff" Tff7b72in Te6edf3data
Tb4b4b4)Tb4b4b4:
Te6edf3viewclass Tff7b72= Ta5d6ff"Ta5d6ffMDDropdownLeadingTrailingIconTextItemTa5d6ff"
Tff7b72elif Tb4b4b4(
Ta5d6ff"Ta5d6ffleading_iconTa5d6ff" Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_iconTa5d6ff" Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_textTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tb4b4b4)Tb4b4b4:
Te6edf3viewclass Tff7b72= Ta5d6ff"Ta5d6ffMDDropdownLeadingTrailingIconItemTa5d6ff"
Tff7b72elif Tb4b4b4(
Ta5d6ff"Ta5d6ffleading_iconTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_iconTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_textTa5d6ff" Tff7b72in Te6edf3data
Tb4b4b4)Tb4b4b4:
Te6edf3viewclass Tff7b72= Ta5d6ff"Ta5d6ffMDDropdownTrailingTextItemTa5d6ff"
Tff7b72elif Tb4b4b4(
Ta5d6ff"Ta5d6ffleading_iconTa5d6ff" Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_iconTa5d6ff" Tff7b72not Tff7b72in Te6edf3data
Tff7b72and Ta5d6ff"Ta5d6fftrailing_textTa5d6ff" Tff7b72in Te6edf3data
Tb4b4b4)Tb4b4b4:
Te6edf3viewclass Tff7b72= Ta5d6ff"Ta5d6ffMDDropdownLeadingIconTrailingTextItemTa5d6ff"

Te6edf3dataTb4b4b4[Ta5d6ff"Ta5d6ffviewclassTa5d6ff"Tb4b4b4] Tff7b72= Te6edf3viewclass

Tff7b72if Ta5d6ff"Ta5d6ffheightTa5d6ff" Tff7b72not Tff7b72in Te6edf3dataTb4b4b4:
Te6edf3dataTb4b4b4[Ta5d6ff"Ta5d6ffheightTa5d6ff"Tb4b4b4] Tff7b72= Te6edf3dpTb4b4b4(T79c0ff48Tb4b4b4)

Te6edf3itemsTff7b72.Td2a8ffappendTb4b4b4(Te6edf3dataTb4b4b4)

Tff7b72selfTff7b72.Td2a8ff_items Tff7b72= Te6edf3items

Tff7b72def Td2a8ffon_header_clsTb4b4b4(
Tff7b72selfTb4b4b4, Te6edf3instance_dropdown_menuTb4b4b4, Te6edf3instance_user_menu_header
Tb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Called when a value is set to the :attr:`header_cls` parameter."""

Tff7b72def Td2a8ffadd_content_header_clsTb4b4b4(Te6edf3intervalTb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffcontent_headerTff7b72.Td2a8ffclear_widgetsTb4b4b4(Tb4b4b4)
Tff7b72selfTff7b72.Td2a8ffidsTff7b72.Td2a8ffcontent_headerTff7b72.Td2a8ffadd_widgetTb4b4b4(Te6edf3instance_user_menu_headerTb4b4b4)

Te6edf3ClockTff7b72.Td2a8ffschedule_onceTb4b4b4(Te6edf3add_content_header_clsTb4b4b4, T79c0ff1Tb4b4b4)

Tff7b72def Td2a8ffon_touch_downTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3touchTb4b4b4)Tb4b4b4:
Tff7b72if Tff7b72not Tff7b72selfTff7b72.Td2a8ffmenuTff7b72.Td2a8ffcollide_pointTb4b4b4(Tff7b72*Te6edf3touchTff7b72.Td2a8ffposTb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffdispatchTb4b4b4(Ta5d6ff"Ta5d6ffon_dismissTa5d6ff"Tb4b4b4)
Tff7b72return Tff7b72True
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffon_touch_downTb4b4b4(Te6edf3touchTb4b4b4)
Tff7b72return Tff7b72True

Tff7b72def Td2a8ffon_touch_moveTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3touchTb4b4b4)Tb4b4b4:
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffon_touch_moveTb4b4b4(Te6edf3touchTb4b4b4)
Tff7b72return Tff7b72True

Tff7b72def Td2a8ffon_touch_upTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3touchTb4b4b4)Tb4b4b4:
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffon_touch_upTb4b4b4(Te6edf3touchTb4b4b4)
Tff7b72return Tff7b72True

Tff7b72def Td2a8ffdismissTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4) Tff7b72-Tff7b72> Tff7b72NoneTb4b4b4:
T8b949e"""Closes the menu."""

Tff7b72selfTff7b72.Td2a8ffon_dismissTb4b4b4(Tb4b4b4)

Tff7b72def Td2a8ff_remove_menuTb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Te6edf3argsTb4b4b4)Tb4b4b4:
Te6edf3WindowTff7b72.Td2a8ffremove_widgetTb4b4b4(Tff7b72selfTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffset_scaleTb4b4b4(Tb4b4b4)


Tff7b72if Tff7b72__name__ Tff7b72== Ta5d6ff"Ta5d6ff__main__Ta5d6ff"Tb4b4b4:
T8b949e# To test the correct menu position.
Tff7b72from T7ee787kivyT7ee787.T7ee787lang Tff7b72import Te6edf3Builder
Tff7b72from T7ee787kivyT7ee787.T7ee787metrics Tff7b72import Te6edf3dp

Tff7b72from T7ee787kivymdT7ee787.T7ee787app Tff7b72import Te6edf3MDApp
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787button Tff7b72import Te6edf3MDRaisedButton
Tff7b72from T7ee787kivymdT7ee787.T7ee787uixT7ee787.T7ee787screen Tff7b72import Te6edf3MDScreen

Tff7b72class T56d364TestTb4b4b4(Te6edf3MDAppTb4b4b4)Tb4b4b4:
Tff7b72def Tff7b72__init__Tb4b4b4(Tff7b72selfTb4b4b4, Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)Tb4b4b4:
Tffa657superTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ff__init__Tb4b4b4(Tff7b72*Tff7b72*Te6edf3kwargsTb4b4b4)
Tff7b72selfTff7b72.Td2a8ffscreen Tff7b72= Te6edf3MDScreenTb4b4b4(Tb4b4b4)
Te6edf3menu_items Tff7b72= Tb4b4b4[Tb4b4b4{Ta5d6ff"Ta5d6fftextTa5d6ff"Tb4b4b4: Ta5d6fffTa5d6ff"Ta5d6ffItem Tffd700{Te6edf3iTffd700}Ta5d6ff"Tb4b4b4} Tff7b72for Te6edf3i Tff7b72in Tffa657rangeTb4b4b4(T79c0ff55Tb4b4b4)Tb4b4b4]
Tff7b72selfTff7b72.Td2a8ffmenu Tff7b72= Te6edf3MDDropdownMenuTb4b4b4(Te6edf3itemsTff7b72=Te6edf3menu_itemsTb4b4b4, Te6edf3width_multTff7b72=T79c0ff4Tb4b4b4)

Tff7b72def Td2a8ffopen_menuTb4b4b4(Tff7b72selfTb4b4b4, Te6edf3callerTb4b4b4)Tb4b4b4:
Tff7b72selfTff7b72.Td2a8ffmenuTff7b72.Td2a8ffcaller Tff7b72= Te6edf3caller
Tff7b72selfTff7b72.Td2a8ffmenuTff7b72.Td2a8ffopenTb4b4b4(Tb4b4b4)

Tff7b72def Td2a8ffon_startTb4b4b4(Tff7b72selfTb4b4b4)Tb4b4b4:
Te6edf3pos_hints Tff7b72= Tb4b4b4[
Tb4b4b4{Ta5d6ff"Ta5d6fftopTa5d6ff"Tb4b4b4: T79c0ff1Tb4b4b4, Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4: T79c0ff0.1Tb4b4b4}Tb4b4b4,
Tb4b4b4{Ta5d6ff"Ta5d6fftopTa5d6ff"Tb4b4b4: T79c0ff1Tb4b4b4, Ta5d6ff"Ta5d6ffcenter_xTa5d6ff"Tb4b4b4: T79c0ff0.5Tb4b4b4}Tb4b4b4,
Tb4b4b4{Ta5d6ff"Ta5d6fftopTa5d6ff"Tb4b4b4: T79c0ff1Tb4b4b4, Ta5d6ff"Ta5d6ffrightTa5d6ff"Tb4b4b4: T79c0ff1Tb4b4b4}Tb4b4b4,
Tb4b4b4{Ta5d6ff"Ta5d6ffcenter_yTa5d6ff"Tb4b4b4: T79c0ff0.5Tb4b4b4, Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4: T79c0ff1Tb4b4b4}Tb4b4b4,
Tb4b4b4{Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4: T79c0ff1Tb4b4b4, Ta5d6ff"Ta5d6ffleftTa5d6ff"Tb4b4b4: T79c0ff1Tb4b4b4}Tb4b4b4,
Tb4b4b4{Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4: T79c0ff1Tb4b4b4, Ta5d6ff"Ta5d6ffcenter_xTa5d6ff"Tb4b4b4: T79c0ff0.5Tb4b4b4}Tb4b4b4,
Tb4b4b4{Ta5d6ff"Ta5d6ffbottomTa5d6ff"Tb4b4b4: T79c0ff1Tb4b4b4, Ta5d6ff"Ta5d6ffrightTa5d6ff"Tb4b4b4: T79c0ff1Tb4b4b4}Tb4b4b4,
Tb4b4b4{Ta5d6ff"Ta5d6ffcenter_yTa5d6ff"Tb4b4b4: T79c0ff0.5Tb4b4b4, Ta5d6ff"Ta5d6ffrightTa5d6ff"Tb4b4b4: T79c0ff1Tb4b4b4}Tb4b4b4,
Tb4b4b4{Ta5d6ff"Ta5d6ffcenter_yTa5d6ff"Tb4b4b4: T79c0ff0.5Tb4b4b4, Ta5d6ff"Ta5d6ffcenter_xTa5d6ff"Tb4b4b4: T79c0ff0.5Tb4b4b4}Tb4b4b4,
Tb4b4b4]
Tff7b72for Te6edf3pos_hint Tff7b72in Te6edf3pos_hintsTb4b4b4:
Tff7b72selfTff7b72.Td2a8ffscreenTff7b72.Td2a8ffadd_widgetTb4b4b4(
Te6edf3MDRaisedButtonTb4b4b4(Te6edf3pos_hintTff7b72=Te6edf3pos_hintTb4b4b4, Te6edf3on_releaseTff7b72=Tff7b72selfTff7b72.Td2a8ffopen_menuTb4b4b4)
Tb4b4b4)

Tff7b72def Td2a8ffbuildTb4b4b4(Tff7b72selfTb4b4b4)Tb4b4b4:
Tff7b72return Tff7b72selfTff7b72.Td2a8ffscreen

Te6edf3TestTb4b4b4(Tb4b4b4)Tff7b72.Td2a8ffrunTb4b4b4(Tb4b4b4)


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────